const mongoose = require('mongoose')
const Schema = mongoose.Schema

// 实例化模板
const FileSchema = new Schema({
  fileUuid: {
    type: String,
    require: true
  },
  userId: {
    type: String
  },
  userName: {
    type: String,
    require: true
  },
  filePage: {
    type: String
  },
  fileName: {
    type: String,
    require: true
  },
  size: {
    type: String
  },
  type: {
    type: String
  },
  date: {
    type: Date,
    default: Date.now()
  }
})

module.exports = mongoose.model('file', FileSchema)
